home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / misc / os.arc / OS.DOC
Text File  |  1980-01-01  |  12KB  |  323 lines

  1.  
  2.  
  3.         The Operating Sytem of the Atari ST
  4.         === ========= ===== == === ===== ==
  5.             copyright 1987 by John Ogawa
  6.  
  7. No part of this document may be reproduced without permission
  8. from the author. Permission is granted to copy this document for
  9. non-commercial purposes only.
  10.  
  11.  
  12.  
  13.  
  14.     Table of Contents
  15.     ----- -- --------
  16.  
  17. 1.0 A wide angle view
  18.  
  19. 2.0 The TOS and some history
  20.     2.1 The GEMDOS
  21.     2.2 The BIOS
  22.     2.3 The XBIOS
  23.     2.4 The Line A routines
  24.     2.5 Wrapup of TOS
  25.  
  26. 3.0 GEM
  27.     3.1 The AES
  28.     3.2 The VDI
  29.     3.3 Wrapup of GEM
  30.  
  31. 4.0 A final wrap up
  32.  
  33. 5.0 Where to read
  34.  
  35. 6.0 Where to reach me
  36.  
  37.  
  38.  
  39.  
  40. Hi there.  This article is an attempt to describe the workings of
  41. the Atari ST's operating system.  Be forewarned that I am not an
  42. ST wizard, and that any information in here was gained through
  43. reading non Atari documentation, playing with the ST, and talking
  44. to people.  In other words, it may not be right! But maybe it is.
  45. Who knows? Read on . . .
  46.  
  47.    The Atari ST has an extremely complex operating system
  48. consisting of several groups of routines that comprise several
  49. different levels of interaction with the machine.  Geez, what I
  50. meant to say was that there are a lot of calls, and that they can
  51. be divided into groups, and these groups are related to each
  52. other in a tree-like way.  The major libraries are the BIOS, the
  53. XBIOS, the GEMDOS, the Line A routines, the AES, and the VDI.
  54. These groups can in turn be put into TOS and GEM.  How do they all
  55. relate? Well, follow me! In the following sections I'll take a
  56. bottom up look at the individual libraries, how they relate to
  57. each other, and what they do.  The first section will talk about
  58. the overall organization of the OS (operating system).
  59.  
  60.  
  61.  
  62.  
  63. 1.0 A wide angle view
  64. ----------------------
  65. The ST's OS can be divided into two large groups of routines,
  66. TOS (Tramiel Operating System), and GEM (Graphics Environment
  67. Manager).  TOS has the underlying routines that make the machine
  68. run, and GEM has the routines that make it talk nice to you.
  69.    TOS can be further broken down into the BIOS, XBIOS, GEMDOS,
  70. and Line A libraries.  These libraries control machine dependant
  71. functions (like controlling the peripherals) and basic I/O.  The
  72. Line A routines are basic graphics routines that are used by GEM
  73. to create the windowing environment that the user sees.
  74.    GEM contains two libraries, the AES and VDI routines.  GEM is
  75. responsible for the windowing environment and the desktop that
  76. make using the ST more intuitive.  The AES is concerned mostly
  77. with windows and dialogs, things that the user interacts with.
  78. The VDI routines handle complex text display and high level
  79. graphics manipulations.
  80.    In the next sections I'll go into the two groups of libraries,
  81. TOS and GEM, and their respective libraries in more detail.  I'll
  82. start with TOS.
  83.  
  84.  
  85.  
  86.  
  87. 2.0 The TOS and some history
  88. -----------------------------
  89.    TOS is the heart of the ST.  Everything you do, run, or write
  90. on your ST uses TOS.  These are the routines that do all the lower
  91. level tasks of running programs.  TOS is present and active in the
  92. ST at all times.  A little information about the background and
  93. design of TOS may help to make it's job clear.
  94.    In the beginning was CP/M, an OS that I am very familiar with
  95. :-).  CP/M was designed to run on a large number of computers,
  96. while keeping a standard interface so that people and programs
  97. could migrate from machine to machine without too much pain.  A
  98. good idea, one that was very popular.  
  99.    CP/M achieved its portability by dividing itself into two
  100. distinct sections, the machine independent and machine dependant
  101. routines.  The code for the machine independent routines was the
  102. same across machines, and whenever it did anything it called the
  103. machine dependant routines using standard names.  This worked
  104. well, and programs very easily moved from machine to machine, and
  105. the CP/M community thrived.
  106.    The came IBM.  When IBM/Microsoft designed PC/MS-DOS they kept
  107. several of the concepts of CP/M.  Then came DRI.  They designed a
  108. machine independent set of routines called GEMDOS which was based
  109. on CP/M and MS-DOS.  It is GEMDOS that makes up the hardware
  110. independent part of TOS.  The file manipulation and task handling
  111. routines of TOS are in GEMDOS.  To fill out TOS, Atari added the
  112. machine dependant routines in the BIOS and XBIOS.  Finally, to
  113. make graphics programming easier, Atari added the Line A
  114. routines.
  115.    So TOS is composed of the "higher" level GEMDOS routines, the
  116. machine dependant BIOS and XBIOS routines, and the Line A
  117. graphics routines.  In the next sub-sections I'll very briefly
  118. describe each of theses libraries.
  119.  
  120.  
  121. 2.1 The GEMDOS
  122. ---------------
  123.    The GEMDOS, as noted before, are the machine independent
  124. routines for handling files and tasks (programs) and doing "high"
  125. level I/O.  They bear a great resemblance to MS-DOS routines.  
  126. These routines make it easy to manipulate files by using Fopen,
  127. Fread, and Fseek.  Controling the execution of programs is managed
  128. using routines such as Pexec and Pterm.  Easy I/O is done using
  129. Cconin and Cconout.  These routines allow the programmer to
  130. perform most of what s/he would like to do with little fuss.
  131.    The GEMDOS is the highest level of TOS.  It is built on
  132. routines in the rest of TOS, namely the BIOS and the XBIOS.  As we
  133. look at the BIOS and XBIOS in the next sub-sections you will find
  134. overlap between them and the GEMDOS.  GEMDOS was written to make
  135. the programmer's job easier by incorporating the lower level
  136. routines into higher level routines that are more specific.
  137.  
  138.  
  139. 2.2 The BIOS
  140. -------------
  141. The BIOS is the collection of routines that the ST uses to
  142. communicate with the many devices available to it.  Using BIOS
  143. routines you can read and write to, and get the status of, the
  144. serial port, the midi port, the parallel port, the disks, and the
  145. screen/terminal.  These routines (like Bconin and Bconout) are
  146. general routines.  With the same routine you can get information
  147. from several sources by varying the calling parameters.  You can
  148. see how the device specific routines in the GEMDOS can be built
  149. from the BIOS routines.  
  150.  
  151.  
  152. 2.3 The XBIOS
  153. --------------
  154. These routines are very much like the BIOS, but involve much more
  155. control over the ST's peripherals.  In general, you read or write
  156. with BIOS calls, you *control* with XBIOS calls.  These routines
  157. also allow you to control the sound chip, the floppy disks, the
  158. serial port, the mouse, and the midi port.  GEMDOS is also built
  159. from these calls.  
  160.  
  161.  
  162. 2.4 The Line A routines
  163. ------------------------
  164. These routines are the graphics primitives in the ST.  They allow
  165. you to create complex graphics with relatively few, simple
  166. commands.  With these routines you can draw pixels, lines and
  167. boxes as well as control sprites and the mouse pointer.  The GEM
  168. routines are built from these routines (but more about that
  169. later).
  170.  
  171.  
  172. 2.5 Wrapup of TOS
  173. ------------------
  174. That was TOS.  Hope it was kind of clear.  Sorry if it wasn't.
  175. Theose routines are the basis for anything you will run on the
  176. ST.  The next level up is GEM.
  177.  
  178.  
  179.  
  180.  
  181. 3.0 GEM
  182. -------
  183.  
  184. Now we come to the complex stuff.  GEM, the Graphics Environment
  185. Manager, is a machine independent (runs on the IBM too) set of
  186. routines that enable the programmer to use windows, dialogs, the
  187. mouse, buttons, and sliders to interface with an end user.  GEM
  188. also allows you to present complex graphics and output them to a
  189. number of different devices.  It is built so that these features
  190. can be defined, accessed, and used with a relatively small number
  191. of routines.  It also allows limited multitasking through desk
  192. accessories.  In addition to all that, GEM allows inter-process
  193. communication and control.  I said it was complex!
  194.    GEM consists of two libraries of routines, the AES
  195. (Application Environment Services) and the VDI (Virtual Device
  196. Interface).  The AES is responsible for drawing and getting input
  197. from windows and dialogs, as well as coordination of multiple
  198. input sources and the interaction between concurrently running
  199. programs.